package com.dayuanit.dy16.atm.boatm.service;

import com.dayuanit.dy16.atm.boatm.dto.MenuDTO;
import com.dayuanit.dy16.atm.boatm.entity.BoRole;
import com.dayuanit.dy16.atm.boatm.entity.BoUser;
import com.dayuanit.dy16.atm.boatm.entity.Permission;
import com.dayuanit.dy16.atm.boatm.vo.PerimissionRequestVO;
import com.dayuanit.dy16.atm.boatm.vo.UserRoleAllocationRequstVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IBoUserService {

    void signUp(String username, String pwd);

    void createRole(String roleName, String roleValue);

    void userRole(UserRoleAllocationRequstVO userRoleAllocationRequstVO);

    void delUserRole(Long userId, Long roleId);

    List<BoRole> loadRole();

    List<Long> loadUserRoles(String username);

    void createPerimission(PerimissionRequestVO perimissionRequestVO);

    List<Permission> listFirstPermission();

    List<MenuDTO> loadMenu();

    List<MenuDTO> loadUnMenu();

    void rolePerimissionAllocation(Long roleId, List<Long> menuIds, List<Long> unMenuIds);

    List<Permission> queryUserPermission(Long roleId);

    List<MenuDTO> loadUserMenu(long userId);

    BoUser login(String username, String password);

    BoUser getUser(String username);

    List<String> getUsersRoleName(String username);
}
